package com.ruoyi.herbseeker.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author:AD
 * @Date:2024/06/04, 19:45:45
 */
@RestController
@RequestMapping("/hs")
public class HSController {
    @GetMapping("/head")
    public List test(){
        List<String> list = new ArrayList<>();
        list.add("￥13141.2");
        list.add("6281");
        list.add("32424");
        list.add("1373");
        list.add("97838");
        return list;
    }

    @GetMapping("/userInfo")
    public List<Map<String, String>> getUserInfo() {
        List<Map<String, String>> list = new ArrayList<>();

        Map<String, String> map1 = new HashMap<>();
        map1.put("money", "￥856.5");
        map1.put("name", "爱吃麦当当");
        map1.put("phone", "13587978587");
        map1.put("level", "1");

        Map<String, String> map2 = new HashMap<>();
        map2.put("money", "￥284.6");
        map2.put("name", "不吃香菜");
        map2.put("phone", "13967859876");
        map2.put("level", "2");


        Map<String, String> map3 = new HashMap<>();
        map3.put("money", "￥274.7");
        map3.put("name", "花开富贵");
        map3.put("phone", "17868781546");
        map3.put("level", "3");

        Map<String, String> map4 = new HashMap<>();
        map4.put("money", "￥84.7");
        map4.put("name", "海阔天空");
        map4.put("phone", "17897856512");
        map4.put("level", "4");

        Map<String, String> map5 = new HashMap<>();
        map5.put("money", "￥685.1");
        map5.put("name", "西子座");
        map5.put("phone", "16878653127");
        map5.put("level", "2");

        Map<String, String> map6 = new HashMap<>();
        map6.put("money", "￥265.2");
        map6.put("name", "超级无敌霸王龙");
        map6.put("phone", "17857653136");
        map6.put("level", "3");

        list.add(map1);
        list.add(map2);
        list.add(map3);
        list.add(map4);
        list.add(map5);
        list.add(map6);

        return list;
    }

    @GetMapping("/pieChartInfo")
    public List<Map<String, Object>> getPieChartInfo() {
        List<Map<String, Object>> list = new ArrayList<>();

        Map<String, Object> map1 = new HashMap<>();
        map1.put("name", "同源");
        map1.put("value", 15);

        Map<String, Object> map2 = new HashMap<>();
        map2.put("name", "沉香");
        map2.put("value", 17);


        Map<String, Object> map3 = new HashMap<>();
        map3.put("name", "玉颜");
        map3.put("value", 20);


        Map<String, Object> map4 = new HashMap<>();
        map4.put("name", "长生");
        map4.put("value", 23);


        Map<String, Object> map5 = new HashMap<>();
        map5.put("name", "育灵");
        map5.put("value", 25);


        list.add(map1);
        list.add(map2);
        list.add(map3);
        list.add(map4);
        list.add(map5);

        return list;
    }

    @GetMapping("/redPoint")
    public Integer getRedPoint() {
        return 99;
    }
}
